﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics.Contracts;
using System.Linq;

namespace $safeprojectname$.Settings
{
    /// <summary>
    ///     Container for the Global settings (stored in the Project.config)
    ///     which are available on every place: Global.Settings
    /// </summary>
    public interface IBaseSettings
    {
        /// <summary>
        ///     Default count for rows on List views
        /// </summary>
        short DefaultListRowCount { get; }

        /// <summary>
        ///     If set to true, JS call will be executed every less then 5 minute.
        /// </summary>
        bool EnableSessionKeeper { get; }

        /// <summary>
        ///     Should be the built-in ASP or MVC Validator appended to the request
        /// </summary>
        bool ValidateRequestOnController { get; }

        /// <summary>
        ///     During debug could be useful to find out which string was not yet localized.
        ///     Default prefix is '$'
        /// </summary>
        string PrefixForNotFoundTranslation { get; }

        /// <summary>
        ///     True will switch application to the Current role management for access rights.
        ///     False will allow mish-mash role handling (e.g. at least one role is found for current action == granted)
        /// </summary>
        bool UseCurrentRole { get; set; }

        /// <summary>
        ///     The name of the ConnectionString in the web.config for the NHibernate
        /// </summary>
        string ConnectionStringNameNHibernate { get; }

        /// <summary>
        ///     The name of the ConnectionString in the web.config for the ADO.NET
        /// </summary>
        string ConnectionStringNameAdoNet { get; }

        /// <summary>
        ///     Settings of the ADO.NET ConnectionString
        /// </summary>
        ConnectionStringSettings DefaultConnectionStringSettingsAdoNet { get; }

        /// <summary>
        ///     The value of the web.config ConnectionString intended for ADO.NET
        /// </summary>
        string DefaultConnectionStringAdoNet { get; }

        /// <summary>
        ///     The name of the class which will serve as the Application Factory for the object creation
        /// </summary>
        Type FactoryProviderType { get; }

        /// <summary>
        ///     Key is the external role name (unique)
        ///     Value is the application role name (could be mapped to more then one external value)
        /// </summary>
        IDictionary<string, string> RolesConvertor { get; }

        /// <summary>
        ///     The list of the action-describing objects, which will help to decide which action 'write'.
        ///     Such action should be prohibited for ReadOnly access.
        /// </summary>
        IEnumerable<WriteAction> WriteActions { get; }

        /// <summary>
        ///     Where are Menu.config and NHibernate.config
        /// </summary>
        ConfigurationFilePath ConfigurationFilePath { get; }

        /// <summary>
        ///     If set to true, infrastructure for NHibernate Dao is put in play.
        ///     False will prevent NHibernate to even startup
        /// </summary>
        bool EnableNHDao { get; }

        /// <summary>
        ///     If set to true, infrastructure for ADO.NET Dao is put in play.
        ///     False will prevent ADO.NET to even startup
        /// </summary>
        bool EnableDbDao { get; }

        /// <summary>
        ///     If set to true, infrastructure for XML Dao is put in play.
        ///     False will prevent XML Dao to even startup
        /// </summary>
        bool EnableXmlDao { get; }

        /// <summary>
        ///     The path to the file, which serves as a mark for Caches to be cleared.
        ///     On web farm could be set to external file (e.g. "c:\DbCache.xml")
        ///     Default value: "DbCache.xml"
        /// </summary>
        string FileCacheDbPath { get; }

        /// <summary>
        ///     The path to the file, which serves as a mark for Caches to be cleared.
        ///     On web farm could be set to external file (e.g. "c:\StaticCache.xml")
        ///     Default value: "StaticCache.xml"
        /// </summary>
        string FileCacheStaticPath { get; }

        /// <summary>
        ///     In a web farm, should be set to true. All Facades static fields will be reloaded
        ///     when the file in the FileCacheStaticPath is changed (LastAccess date is changed).
        ///     Default value is "false" (only needed on a web farm).
        ///     NOTE on a single worker process, Facade static members should be cleaned using the Change event
        /// </summary>
        bool AllowFileCacheDependencyForStatic { get; }

        /// <summary>
        /// Default collation for a like expression. (default is Latin1_General_CI_AS)
        /// </summary>
        string DaoDefaultLikeCollation { get; }
    }
}